package day040625;

public class Test9 {
    public static void main(String[] args) {
        //1.准备数据
        int month=6;
        String  discountPerson="学生";
        double ticketPrice=85;
        //2.判断区间
        if(3<=month && month<=10){
            //byte short int long float doube char boolean  用==判断是否相等
            if(discountPerson.equals("老师") || discountPerson.equals("学生")||discountPerson.equals("军人")||discountPerson.equals("残疾人")){
                System.out.println("门票打9折后的价格为：" +  ticketPrice*0.9);
            }else{
                System.out.println("门票的价格为：" +  ticketPrice);
            }
        }else{
            //byte short int long float doube char boolean  用==判断是否相等
            if(discountPerson.equals("老师") || discountPerson.equals("学生")||discountPerson.equals("军人")||discountPerson.equals("残疾人")){
                System.out.println("门票打9折后的价格为：" +  ticketPrice*0.9*0.8);
            }else{
                System.out.println("门票的价格为：" +  ticketPrice*0.8);
            }
        }
    }
}
